﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace X3DLib
{
    public class Fire : ParticleSystem
    {
        public override void initialize()
        {
            this.num = "1000";
            this.nodeName = "fire";
        }
        public override void addSubClassRoutes(ref Group group, string nodeName)
        {
            //base.addSubClassRoute(ref group, nodeName);
            ROUTE route = new ROUTE("hitNormal_changed", nodeName + "_touch", "touch_position", nodeName + "_control");
            group.addChildren(route);
        }
        public override void addSubClassScriptFields(ref Script s)
        {
            //base.addSubClassScriptFields(ref s);
            s.addChildren(new field("touch_position", "SFVec3f"));
            s.addChildren(new field("FreeNum", "SFInt32"));
            s.addChildren(new field("FreePartArray", "MFInt32"));
        }
        public override string createSubClassScript()
        {
            FireScriptFacotr.FireNormalScript script = new X3DLib.FireScriptFacotr.FireNormalScript();
            this.addChildren(new Background() { skyColor = "1 1 1" });
            return script.normalFireMain();
        }
    }
}
